<?php
namespace Home\Service;

use Think\Service\BasicService;

class IndexService extends BasicService {
    public function insert($model) {
        return $this->db->add($model);
    }

    public function remove($condition) {
        return $this->db->where($condition)->delete();
    }

    public function update($model) {
        return $this->db->save($model);
    }

    public function find($condition) {
        return $this->db->find($condition);
    }

    public function query($condition) {
        return $this->db->where($condition)->order('SORT')->select();
    }
}

?>